package com.neusoft.jxc.bean;

import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * <pre>
 *   1.编写 一个类 与数据库表形成对应关系：类名要满足java命名规范，不一定与数据库表名一致
 *   2.编写类的属性与数据库表的列形成对应关系：类的属性名与表的列名对应，属性的数据类型与列的数据类型对应
 *   3.对类的属性进行封装：构造器封装  和 get/set方法封装  ，toString方法重写等
 * 
 * </pre>
 * 
 * @author chens
 *
 */
public class SysUser extends Base {

	private Integer userNo;
	private String userName;
	private String nickName;
	private String salt;
	private String password;
	private String userPhone;
	private String userEmail;

	/**
	 * <pre>
	 * &#64;JsonFormat在服务器端对要显示的数据进行处理，使用jackson对时间进行格式化，默认的时区是GMT+1区，需要设置为国内的时区GMT+8区；
	 * &#64;DateTimeFormat在服务器接收客户端发送来的数据，默认spring MVC只接受英式格式(yyyy/MM/dd  ,MM/dd/yyyy , Mon Nov 02 15:40:08 CST 2020)的时间输入,如果是非英式时间格式，则需要配置特定的时间格式
	 * </pre>
	 */
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date userDate;

	public SysUser() {
		super();
	}

	public SysUser(Integer userNo, String userName, String nickName, String password, String userPhone, String userEmail,
			Date userDate) {
		super();
		this.userNo = userNo;
		this.userName = userName;
		this.nickName = nickName;
		this.password = password;
		this.userPhone = userPhone;
		this.userEmail = userEmail;
		this.userDate = userDate;
	}
	
	

	public SysUser(Integer userNo, String userName, String nickName, String salt, String password, String userPhone,
			String userEmail, Date userDate) {
		super();
		this.userNo = userNo;
		this.userName = userName;
		this.nickName = nickName;
		this.salt = salt;
		this.password = password;
		this.userPhone = userPhone;
		this.userEmail = userEmail;
		this.userDate = userDate;
	}

	public Integer getUserNo() {
		return userNo;
	}

	public void setUserNo(Integer userNo) {
		this.userNo = userNo;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getUserPhone() {
		return userPhone;
	}

	public void setUserPhone(String userPhone) {
		this.userPhone = userPhone;
	}

	public String getUserEmail() {
		return userEmail;
	}

	public void setUserEmail(String userEmail) {
		this.userEmail = userEmail;
	}

	public Date getUserDate() {
		return userDate;
	}

	public void setUserDate(Date userDate) {
		this.userDate = userDate;
	}

	public String getSalt() {
		return salt;
	}

	public void setSalt(String salt) {
		this.salt = salt;
	}
	
	
	
}
